package com.mycompany.inventory.pojo;

import java.sql.Date;

public class Inventory {
	private String Id;
	private String name;
	private Integer location;
	private Integer quantity;	
	private boolean deleted;

	public Inventory(String id, String name, Integer location) {
		this.setId(id);
		this.setName(name);
		this.setLocation(location);
		deleted = false;
		quantity = 0;
	}
	
	public Inventory(String id, String name, Integer location, Integer quantity) {
		this.setId(id);
		this.setName(name);
		this.setLocation(location);
		this.setQuantity(quantity);
		deleted = false;
	}

	public Inventory() {
		this.setId("");
		this.setName("");
		this.setLocation(0);
		this.setQuantity(0);
		deleted = false;
	}
	
	public void clear(){
		this.setId("");
		this.setName("");
		this.setLocation(0);
		this.setQuantity(0);
		deleted = false;
	}
	
	public void copyValue(Inventory Obj){
		this.setId(Obj.getId());
		this.setName(Obj.getName());
		this.setLocation(Obj.getLocation());
		this.setDeleted(Obj.isDeleted());
		this.setQuantity(Obj.getQuantity());
	}
	
	public Integer getQuantity() {
		return quantity;
	}

	public void setQuantity(Integer quantity) {
		this.quantity = quantity;
	}


	/**
	 * @return the id
	 */
	public String getId() {
		return Id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(String id) {
		Id = id;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the location
	 */
	public Integer getLocation() {
		return location;
	}

	/**
	 * @param location the location to set
	 */
	public void setLocation(Integer location) {
		this.location = location;
	}
	
	public String toString(){
		return name;
	}
	
	public boolean isDeleted() {
		return deleted;
	}

	public void setDeleted(boolean deleted) {
		this.deleted = deleted;
	}
	
}
